<template>
    <div>
        <van-sticky>
            <van-nav-bar title="生活缴费" left-text="返回" left-arrow @click-left="onClickLeft" />
        </van-sticky>
        <div class="newsPic">
            <img :src="'http://218.7.112.123:10001/'+detailData.cover" alt="">
        </div>
        <div class="content" v-html="detailData.content">

        </div>
    </div>
</template>
<script>
import nav from "@/mixin/nav"
import { newsQuery } from "@/service/living/linvingService";
export default {
    mixins: [nav],
    data() {
        return {
            detailData: {}
        }
    },
    methods: {
        onClickLeft() {
            this.$router.go(-1);
        }
    },
    async created() {
        let id = this.$route.params.id;
        console.log(id);
        let { data } = await newsQuery(id);
        console.log(data);
        this.detailData = data.data;
    }
}


</script>
<style scoped lang="scss">
.newsPic {
    img {
        width: 100%;
    }
}
</style>